package com.tianji.learning.controller;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.query.AdminNotesQuery;
import com.tianji.learning.domain.vo.AdminNotesVO;
import com.tianji.learning.service.IUserNoteService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author ymm
 * @since 2023-04-26
 */
@RestController
@RequestMapping("/admin/notes")
@RequiredArgsConstructor
@Api(tags = "管理端笔记功能相关接口")
public class AdminUserNoteController {
    private final IUserNoteService userNoteService;

    @GetMapping("/page")
    @ApiOperation("用户端笔记分页查询")
    public PageDTO<AdminNotesVO> adminQueryNotesByPage(AdminNotesQuery notesQuery) {
        return userNoteService.adminQueryNotesByPage(notesQuery);
    }
}
